package nut.common.handler.handler;

import nut.common.handler.exceptionhandler.MyException;
import nut.common.utils.JwtUtil;
import org.springframework.util.StringUtils;
import org.springframework.web.servlet.AsyncHandlerInterceptor;
import org.springframework.web.servlet.HandlerInterceptor;
import org.springframework.web.servlet.ModelAndView;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * @Author: 郜宇博
 * @Date: 2021/12/21 13:22
 */
public class LoginInterceptor  implements HandlerInterceptor {

    //@Override
    //public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
    //    boolean isLogin = JwtUtil.checkToken(request);
    //    if(isLogin){
    //        return true;
    //    }else {
    //        throw new MyException(20001,"请登录");
    //    }
    //}
}
